/**
 * 
 */
package com.flymobi.sgip.smg;

import com.flymobi.fw.util.MyQueue;

/**
 * @author Administrator
 *
 */
public class IdQueue {
//	private static IdQueue instance=new IdQueue();
	private static MyQueue<Long> queue=new MyQueue<Long>();
	
	public static synchronized void save(Long id){
		queue.enqueue(id);
		if(queue.size()>10000){
			try{
				queue.dequeue();
			}catch(Exception e){
				;
			}
		} 
	}
	
	public static synchronized boolean exists(Long id){
		return queue.getList().contains(id);
	}
}
